<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/7/17
 * Time: 14:55
 */

use yii\grid\GridView;
use yii\helpers\Html;
use common\components\widgets\Datetimepicker;
use doumiaoduo\layer\LayerConfirmWidget;
use doumiaoduo\layer\LayerIframeWidget;
use common\components\extenders\MenuManage;

LayerConfirmWidget::widget();
LayerIframeWidget::widget();
Datetimepicker::widget(['flag' => 'timepicker']);
?>
<div class="yx-praise-list-box yx-praise-box yx-radius2">
    <div class="docs-main zx-mg">
        <?= GridView::widget([
            'dataProvider' => $dataProvider,
            'columns' => [
//                [
//                    'attribute' => 'goods_id',
//                    'value' => 'goods_id',
//                    'label' => '序号'
//                ],
                [
                    'attribute' => 'admin_name',
                    'value' => 'admin_name',
                    'label' => '副负责人姓名'
                ],
                [
                    'attribute' => 'potential',
                    'value' => 'potential',
                    'label' => '潜在客户数量'
                ],
                [
                    'attribute' => 'intention',
                    'value' => 'intention',
                    'label' => '意向客户数量'
                ],
//                [
//                    "class" => "yii\grid\ActionColumn",
//                    "template" => "{details}",
//                    "header" => "操作",
//                    "buttons" => [
//                        "details" => function ($url, $model, $key) {
//                            return (new MenuManage(Menumanage::RECORD_ITEM_TOOLBAR))->detailsMenu('newclassmanage', 'details', true, ['rel' => 'dialog-show-iframe', 'class' => 'btn yx-radius2 yx-d-card yx-bg65d1d4', 'data' => ['id' => $key]]);
//                        },
//                    ],
//                ],
            ],
            'emptyText'=>'',
            'emptyTextOptions'=>['style'=>'background: url(/images/no_content.png) no-repeat center center;width:100%;height:500px;'],
            'layout' => "{items}\n<div style='text-align: right'>{pager}</div>",
            'showOnEmpty' => false,
            'options' => ['class' => 'tablesaw'],
            'captionOptions' => ['style' => 'border:1px solid rgb(238, 238, 238);padding: 10px 0px;'],
            'headerRowOptions' => ['class' => 'yx-bgd2f6ec'],
            'footerRowOptions' => ['class' => 'yx-floatl yx-color73bbef yx-font13 yx-lh24'],
            'tableOptions'=>['class' => 'table table-striped table-bordered yx-table1 yx-table3'],
            'pager' => [
                'class' => \common\components\widgets\GoPager::className(),
            ]
        ]); ?>
    </div>
</div>